package com.liam.websocketdemo.controller;

import com.liam.websocketdemo.service.TransService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiamLMK
 * @CreateTime: 2024-11-20
 * @Description:
 * @Version: 1.0
 */

@Slf4j
@RestController
public class TransController {

    @Autowired
    private TransService transService;

    @RequestMapping("/start-translation")
    public String startTranslation() throws Exception {
        // 启动翻译功能
        transService.startTranslation();
        return "Translation started!";
    }
}
